﻿@model Demo.Models.Car
@{
    Layout="~/Views/Shared/_Layout.cshtml";
    ViewBag.Title = "Index";
}

<h2>@Demo.Resource.Name</h2>
@Model.Name
<script>
    $(function () {
        $.ajax({
            url: '../../Api/SmartApi/1',
            type: "GET",
            contentType: "application/json",
            success: function (data) { alert(data.ID); }
        });
        $.ajax({
            url: '../../Api/SmartApi',
            type: "POST",
            data:{a:1},
            dataType:"json",
            success: function (data) { alert(2); }
        });
    });
</script>